ComponentOne Data Source for Entity Framework
C1.LiveLinq Namespace / LiveViewExtensions Class / LiveCount Method / LiveCount<T>(View<T>) Method
The type of the elements of source.
A view that contains elements to be counted.

In This Topic
    LiveCount<T>(View<T>) Method
    In This Topic
    A view representing the number of elements in a view.
    Syntax
    'Declaration
     
    
    Public Overloads Shared Function LiveCount(Of T)( _
       ByVal source As View(Of T) _
    ) As AggregationView(Of T,Integer)
    public static AggregationView<T,int> LiveCount<T>( 
       View<T> source
    )

    Parameters

    source
    A view that contains elements to be counted.

    Type Parameters

    T
    The type of the elements of source.
    Remarks
    It is possible to use standard LINQ query operator Count instead of LiveCount. Both are "live" in the sense that they are recomputed automatically when any change occurs in the source. The difference is that Count will every time loop through the entire source collection and aggregate it from scratch, whereas LiveCount will use a more performant algorithm, will maintain its value incrementally, processing only those source items that actually changed.
    See Also